<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      >

    <body>

        <ui:composition template="./../Template.xhtml">

            <ui:define name="title">
                Ingresar Rol
            </ui:define>

            <ui:define name="body">
                <ice:panelGroup id="messagePanel" layout="block">
                    <ice:messages globalOnly="true" errorClass="errorMessages" infoClass="infoMessages" layout="table"/>
                </ice:panelGroup>
                <ice:form partialSubmit="true" id="crearRolForm">
                    <ice:inputHidden id="validateCreateField" validator="#{rol.validateCreate}" value="value"/>
                    <fieldset class="form">
                        <legend class="form">Ingresar rol</legend>
                        <ice:panelGrid columns="3" styleClass="standardTable" footerClass="tableFooter" columnClasses="tituloLateral messageRight message" >
                            <ice:outputText value="Nombre rol:"/>
                            <ice:inputText id="rol" maxlength="20" value="#{rol.rol.nombre}" title="Nombre" required="true" requiredMessage="*" style="border:1px solid black" />
                            <ice:message for="rol" errorClass="errorMessages" />
                        </ice:panelGrid>
                        <br />
                        <ice:panelGrid styleClass="standardTable" columnClasses="tituloLateral">
                            <ice:selectManyCheckbox style="text-align:left" layout="pageDirection" id="ensayoCollection" value="#{rol.rol.jsfcrud_transform[jsfcrud_class['jsf.util.JsfUtil'].jsfcrud_method.collectionToArray][jsfcrud_class['jsf.util.JsfUtil'].jsfcrud_method.arrayToList].ensayoCollection}" title="Ensayos" converter="#{ensayo.converter}" >
                                <f:selectItems value="#{ensayo.ensayoItemsAvailableSelectMany}"/>
                            </ice:selectManyCheckbox>
                        </ice:panelGrid>
                    </fieldset>
                    <br />
                    <ice:commandLink action="#{rol.create}" title="Guardar" >
                        <ice:graphicImage height="25x" url="/Imagenes/Guardar.png" />
                    </ice:commandLink>
                    <ice:commandLink action="#{rol.listSetup}" title="Mostrar roles">
                        <ice:graphicImage height="25px" url="/Imagenes/Listar.png" />
                    </ice:commandLink>
                </ice:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
